//获取应用实例
const app = getApp()

const citys = {};
Page({
    data: {
        flag: true,
        imgList: [
        {
            img: '/images/120_tboss.jpg',
        },
        {
            img: '/images/劳拉.jpg',
        },
        
    ],
    translateZ: '0px',

    items: [
        { "name": "", "pic": "/images/fashion_1.jpg" },
        { "name": "", "pic": "/images/fashion_2.jpg" },
        { "name": "", "pic": "/images/fashion_3.jpg" },
        { "name": "", "pic": "/images/fashion_4.jpg" },
        { "name": "", "pic": "/images/fashion_5.jpg" },
        { "name": "", "pic": "/images/fashion_7.jpg" },
        { "name": "", "pic": "/images/fashion_8.jpg" },
        { "name": "", "pic": "/images/fashion_9.jpg" },
        { "name": "", "pic": "/images/fashion_10.jpg" },
        { "name": "", "pic": "/images/fashion_11.jpg" },
        { "name": "", "pic": "/images/fashion_12.jpg" },
        { "name": "", "pic": "/images/fashion_13.jpg" }
    ]

    },
    onShow(){
        this.playShow()
    },
    onLoad(options) {
		const that = this;
		wx.getSystemInfo({
			success: (res) => {
				that.setData({
					translateZ: (res.windowWidth / 2 - 20) + 'px'
				});
			}
		});
	},
    play() {
		this.animate('#carousel_id', [
			{ ease: 'ease', rotateY: 0 },
			{ ease: 'ease', rotateY: 3600 }
		], 5000, function () {
			console.log('回调成功，旋转结束');
		}.bind(this));
	},
    playShow() {
		this.animate('#carousel_id', [
			{ ease: 'ease', rotateY: 0 },
			{ ease: 'ease', rotateY: 666666 }
		], 99999999, function () {
			console.log('回调成功，旋转结束');
		}.bind(this));
	},
    // 下拉刷新
    onPullDownRefresh: function() {
        setTimeout(() => {
            console.log('下拉刷新')
            wx.stopPullDownRefresh()
        }, 500)
    },
    golostAndFound(){
        wx.navigateTo({
            url: '/pages/home/lostAndFound/index',
        })
    },
    goCampusNavigation(){
        wx.navigateTo({
            url: '/pages/home/CampusNavigation/index',
        })
    },
    goCampusCalendar(){
        wx.navigateTo({
            url: '/pages/home/CampusCalendar/index',
        })
    },
    goCampusMusic(){
        wx.navigateTo({
            url: '/pages/home/CampusMusic/index',
        })
    },
    goTyq(){
        wx.navigateTo({
            url: '/pages/home/CampusTyq/index',
        })
    }

})